<template>
  <view class="container">
    <uni-list>
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="姓名" :rightText="user.pName" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="账号" :rightText="user.pId" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="性别" :rightText="user.pGender" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="手机号" :rightText="user.pPhone" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="身份证号" :rightText="user.pCard" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="邮箱" :rightText="user.pEmail" />
	  <uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="出生日期" :rightText="user.pBirthday" />
	  <uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="年龄" :rightText="user.pAge" />
    </uni-list>
  </view>
</template>

<script>
  import { getUserProfile } from "@/api/system/user"

  export default {
    data() {
      return {
        user: {},
        roleGroup: "",
        postGroup: ""
      }
    },
    onLoad() {
      this.getUser()
    },
    methods: {
      getUser() {
		const pId = uni.getStorageSync('pid');
        getUserProfile(pId).then(response => {
		console.log("客户信息---"+JSON.stringify(response))
          this.user = response.data
        })
      }
    }
  }
</script>

<style lang="scss">
  page {
    background-color: #ffffff;
  }
</style>
